#ifndef _DEBUG_H
#define _DEBUG_H

#include <stdio.h>
#include "config.h"

#ifdef ENABLE_DEBUG

  #define __DEBUG_MSG(a, x...) do{printf("Debug:%s %s %d : "a, \
        __FILE__, __FUNCTION__, __LINE__, ##x);} \
        while(0)

#else

  #define __DEBUG_MSG(a, x...)

#endif

#ifdef ENABLE_ERROR

  #define __ERROR_MSG(a, x...) do{fprintf(stderr, "Error:%s %s %d : "a, \
        __FILE__, __FUNCTION__, __LINE__, ##x);} \
        while(0)
#else

  #define __ERROR_MSG(a, x...)

#endif

#endif
